public class Test {

    public static void main(String[] args) {

    }

//    日期DMY转换日月年
    public static String charToChinese(String str){

        if (str.contains("D")){
            str.replace("D","日");
        }else if (str.contains("M")){
            str.replace("M","月");
        }else if (str.contains("Y")){
            str.replace("Y","年");
        }
        return str;
    }
}
